只需要你修改apache配置文件/etc/httpd/conf/httpd.conf即可
你只要对应设置即可,在httpd.conf最底部添加: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 NameVirtualHost *:80 VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html ServerName #ErrorLog /var/log/httpd/yourweb/error_log #留意,让处事器支持多个网站,这里我配置了以天为单元出产日志 ErrorLog |rotatelogs /var/log/httpd/yourweb/error_log%Y_%m_%d.log 86400 480 #CustomLog /var/log/httpd/yourweb/access_log common CustomLog |rotatelogs /var/log/httpd/yourweb/access_log%Y_%m_%d.log 86400 480 common /VirtualHost VirtualHost *:80 ServerAdmin [email protected] DocumentRoot /var/www/html/blog ServerName blog.yourweb.com ErrorLog /var/log/httpd/blog/error_log CustomLog /var/log/httpd/blog/access_log common /VirtualHost 如上我设置了两台虚拟主机:域名别离为 blog.yourweb.com 留意,针对Apache。
内里有个example文件,重启apache后才生效(service httpd restart) , 如何让centos(redhat)设置虚拟主机。
只需要你修改apache设置文件/etc/httpd/conf/httpd.conf即可, 1 2 3 4 5 6 7 #VirtualHost *:80 # ServerAdmin [email protected] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #/VirtualHos 你可以参照我的设置,。
相关热词:
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/xt/centos/12615.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
RedHat系统怎么设置或更改
时间:2021-01-10
-
centos系统密码忘了怎么破
时间:2021-01-10
-
CentOS 6.6系统桌面字体怎么
时间:2021-01-09
-
linux系统加载raid驱动的教
时间:2021-01-09
-
用Mac在CoreOS上搭建WordPre
时间:2021-01-06
-
Centos php 扩展方式安装gd库
时间:2021-01-06
-
如何安装CentOS 6.6 图文详解
时间:2020-12-29
-
设置CentOS系统的时间同步
时间:2020-12-27
热门文章
-
用Mac在CoreOS上搭建WordPress的教程
时间:2021-01-06
-
centos怎么安装CrossOver
时间:2020-12-23
-
centos系统VPS服务器挂载数据盘教程
时间:2020-12-27
-
CentOS6/7 专用破解版锐速一键安装脚本
时间:2020-12-27
-
CentOS设置IP连接网络实现过程图解
时间:2020-12-23
-
Centos php 扩展方式安装gd库的方法
时间:2021-01-06
-
在CentOS服务器上配置NTP服务器的教程
时间:2020-12-23
-
CentOS系统限制普通用户切换到root管理员账
时间:2020-12-27
-
设置CentOS系统的时间同步的教程
时间:2020-12-27
-
centos7怎么进去tmp目录并清除垃圾?
时间:2020-12-27
